using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyState
{
    protected Rigidbody2D rb;
    protected float stateTimer;
    protected Enemy Enemy;
    protected EnemyStateMachine StateMachine;
    private string animBoolName;
    protected bool triggerCalled;

    public EnemyState(Enemy _enemyBase, EnemyStateMachine _enemyStateMachine, string _animBoolName)
    {
        this.Enemy = _enemyBase;
        this.StateMachine = _enemyStateMachine;
        this.animBoolName = _animBoolName;
    }

    public virtual void Update()
    {
        stateTimer -= Time.deltaTime;
        
    }
    public virtual void Enter()  
    {
        triggerCalled = false;
        rb = Enemy.rb;
        Enemy.anim.SetBool(animBoolName,true);
    }
    public virtual void Exit()
    {

        
        
        Enemy.anim.SetBool(animBoolName,false);
    }
    public virtual void AnimationFinishTrigger()
    {
        triggerCalled = true;
    }
}
